<template>
  <div class="header">
    <h1 class="header-title">智慧新能源物联监管云平台</h1>
    <span class="header-icon" v-if="!maximized" @click="handleFullScreen">
      <icon-svg name="quanping"></icon-svg>
    </span>
    <span class="header-icon" v-else @click="handleFullScreen">
      <icon-svg name="quxiaoquanping"></icon-svg>
    </span>
  </div>
</template>
<script>
export default {
  name: 'HomeHeader',
  props: {
    maximized: Boolean
  },
  methods: {
    // 全屏
    handleFullScreen () {
      this.$emit('change')
    }
  }
}
</script>
<style lang="scss">
  .header{
    position: relative;
    width: 100%;
    height: 88px;
    background-image: url(~@/assets/img/bg_top.png);
    background-position:center;
    text-align: center;
    .header-title{
      margin: 0;
      font-size: 36px;
      color: #00f6ff;
      font-weight: 400;
      line-height: 88px;
    }
    .header-icon{
      position: absolute;
      top: 16%;
      right: 10px;
      width: 40px;
      height: 40px;
      display: inline-block;
      text-align: center;
      line-height: 40px;
      font-size: 40px;
      color: #33b5e3;
      cursor: pointer;
      &:hover{
        opacity: 0.6;
      }
    }
  }
</style>